<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
 
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>

<div class="container">
   <form:form action="new" method="post" commandName="contendor" enctype="multipart/form-data" cssClass="form-horizontal">
       <br><br>
       <h3>Registro de Contendor</h3>
             <div class="row">
                    <div class="hero-unit-min"> 
                        <table align="center" border=0 cellspacing=2 cellpadding=0 width="90%" height="50px" bordercolor=red >
                            <tr>
                                <td>Contendor:</td>
                                    <td> 
                                        <form:input path="nocontendor"></form:input>
                                        <form:errors path="nocontendor" cssstyle="color:red"></form:errors>
                                    </td>
                                <td>Tipo:</td>
                                    <td>
                                          <form:select path="fltipo">
                                            <option value="0">Seleccione</option>
                                            <option value="1">Imagen</option>
                                            <option value="2">Texto</option>
                                           </form:select>
                                           <form:errors path="fltipo" cssstyle="color:red"></form:errors>
                                    </td>
                            </tr>
                            <tr>
                                <td>Imagen:</td>
                                    <td>
                                        <!--form:input path="noimagen"><!--/form:input-->
                                        <form:input  path="avatar" type="file"/>
                                        <form:errors path="avatar" cssstyle="color:red"></form:errors>
                                    </td>
                                <td>Texto:</td>
                                    <td>
                                        <form:input path="txtexto"></form:input>
                                        <form:errors path="txtexto" cssstyle="color:red"></form:errors>
                                    </td>
                            </tr>
                            <tr>
                                <!--td>Fecha de Registro:</td>
                                    <td>
                                        <!--form:input path="fcregistro"><!--/form:input-->
                                        <!--form:errors path="fcregistro" cssstyle="color:red"><!--/form:errors>
                                    </td-->
                                <td>Estado:</td>
                                     <td>
                                          <form:select path="idestado">
                                            <option value="1">Activo</option>
                                            <option value="0">Inactivo</option>
                                           </form:select>
                                           <form:errors path="idestado" cssstyle="color:red"></form:errors>
                                    </td>
                             </tr>
            <tr align="center">
                <td colspan="4">
                     <input name="" value="Grabar" type="submit" class="btn btn-primary" onclick="if (deleteContendor()) { return true; } else { return false; }">
                     <a style="margin-left: 5px;" href="<c:url value='/pages/contendor/index'/>">Cancelar</a>
                </td>
            </tr>
            </table>
        </div>
        </div>
     </form:form>
</div>